home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ARMLINUX / MAIL / 9804 / 000059_linux@arm.uk.linux.org _Fri Apr 17 12:23:46 1998.msg < prev    next >
Internet Message Format  |  1998-05-13  |  3KB

  1. Return-Path: <linux@arm.uk.linux.org>
  2. Received: from snowcrash.cymru.net (snowcrash.cymru.net [163.164.160.3])
  3.     by odie.barnet.ac.uk (8.8.6/8.8.6) with ESMTP id MAA24890
  4.     for <willy@odie.barnet.ac.uk>; Fri, 17 Apr 1998 12:23:44 +0100
  5. Received: from caramon.armlinux.org (dialup2.cymru.net [163.164.160.66]) by snowcrash.cymru.net (8.8.7/8.7.1) with ESMTP id MAA30214 for <willy@odie.barnet.ac.uk>; Fri, 17 Apr 1998 12:24:39 +0100
  6. Received: from raistlin.armlinux.org (raistlin [192.168.0.3]) by caramon.armlinux.org (8.7.4/8.7.3) with ESMTP id KAA21450 for <willy@odie.barnet.ac.uk>; Fri, 17 Apr 1998 10:07:37 +0100
  7. From: Russell King - ARM Linux Admin <linux@arm.uk.linux.org>
  8. Received: (from linux@localhost) by raistlin.armlinux.org (8.7.4/8.7.3) id JAA00401 for willy@odie.barnet.ac.uk; Fri, 17 Apr 1998 09:52:06 +0100
  9. Message-Id: <199804170852.JAA00401@raistlin.armlinux.org>
  10. Subject: Re: memfastset.S
  11. To: willy@odie.barnet.ac.uk (Matthew Wilcox)
  12. Date: Fri, 17 Apr 1998 09:52:05 +0100 (BST)
  13. In-Reply-To: <199804170653.HAA23693@odie.barnet.ac.uk> from "Matthew Wilcox" at Apr 17, 98 07:53:16 am
  14. X-Mailer: ELM [version 2.4 PL24]
  15. MIME-Version: 1.0
  16. Content-Type: text/plain; charset=US-ASCII
  17. Content-Transfer-Encoding: 7bit
  18. Status: RO
  19.  
  20. Matthew Wilcox writes:
  21. > I've optimised Russell's code a bit.  I've changed rather a lot in fact,
  22. > but I've stuck to his structure rather than try to work out whether a
  23. > 64-byte inner loop would be better, or whether it would make sense to
  24. > sacrifice more registers to make the inner loop smaller.  Here's the first
  25. > version, which I have tested in BBC BASIC's assembler and then rewritten in
  26. > GAS style, so typos may exist though I checked it three times.
  27. > It is definitely faster for large blocks of data since I removed an
  28. > instruction from the inner loop.  I suspect it to be faster for small
  29. > blocks of data as well, but have not tested this hypothesis.
  30.  
  31. I presume that you did check out where it was used ;)
  32.  
  33. You have to be careful how many registers you use in LDMs/STMs on the A5000.
  34. I have found that generally using more than 4 causes floppy FIQ underruns
  35. (since a LDM/STM effectively locks out FIQs for (worst case) (n+1)S+1N
  36. cycles, plus on top of that you've got the VIDC DMA, sound DMA and DRAM
  37. refresh.  This is enough to push the FIQ response time over the limit.
  38. To prove this, I went to the trouble of using a logic analyser on my A5000!
  39. Hence, I think that sticking to 4 registers is a must.
  40.  
  41. It'll give us a bit more speed on the console though ;)
  42.  
  43. The critical one is in string.S - memset, which is used for general purpose
  44. memory setting, and memzero for pages and other things needing a quick
  45. zero'ing of an aligned piece of memory with 32-byte granularity.
  46.    _____
  47.   |_____| ------------------------------------------------- ---+---+-
  48.   |   |        Russell King       linux@arm.uk.linux.org      --- ---
  49.   | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  50.   | +-+-+                                                     --- -+-
  51.   /   |               THE developer of ARM Linux              |+| /|\
  52.  /  | | |                                                     ---  |
  53.     +-+-+ -------------------------------------------------  /\\\  |